-
Notifications
You must be signed in to change notification settings - Fork 1
fix: TTA-209 add subscription to login component for redirecting user #949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: TTA-209 add subscription to login component for redirecting user #949
Conversation
…s when token expires to login page
[infrastructure/][stage] Terraform Plan 📖
|
[infrastructure/][prod] Terraform Plan 📖
|
@@ -64,15 +64,12 @@ export class LoginComponent implements OnInit { | |||
ngOnInit() { | |||
|
|||
this.googleAuthSDK(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviisale si esta linea no te da conflictos porque es del Auth de google
Kudos, SonarCloud Quality Gate passed!
|
[infrastructure/][stage] Terraform Plan 📖
|
[infrastructure/][prod] Terraform Plan 📖
|
The purpose of this Pull Request is to redirect the user when his access token expires.
How?
I merged the logic that was used in legacy. We subscribe to the login service, and it will unsubscribe if we try to make a request with an expired token. Also, in the token injector HTTP interceptor, I added a pipe that checks if the response is 401 unauthorized. If it is, it will redirect the user to the login page.
Files changed